package edu.zut.dvd_demo.entity;

import java.time.LocalDate;

/**
 * DVD实体信息类
 * 属性私有化、生成getter/setter以及构造
 */
public class DVD {

    private String name;//dvd名称
    private int state;//当前dvd状态    0表示未借出   1表示已借出
    private LocalDate date;//借出时间
    private long count;//借出次数
    private double rent;//租金

    public DVD() {
    }

    public DVD(String name, int state, LocalDate date, long count, double rent) {
        this.name = name;
        this.state = state;
        this.date = date;
        this.count = count;
        this.rent = rent;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public long getCount() {
        return count;
    }

    public void setCount(long count) {
        this.count = count;
    }

    public double getRent() {
        return rent;
    }

    public void setRent(double rent) {
        this.rent = rent;
    }

    @Override
    public String toString() {
        return "DVD{" +
                "name='" + name + '\'' +
                ", state=" + state +
                ", date=" + date +
                ", count=" + count +
                ", rent=" + rent +
                '}';
    }
}
